<?php
/**
 * Created by PhpStorm.
 * User: 汪凤杰
 * Date: 2017/11/9
 * Time: 13:31
 */
//var_dump('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
if (is_file($_SERVER['DOCUMENT_ROOT'] . '/ucenter/src/JSSDK/JSSDK.php')) {
    require_once $_SERVER['DOCUMENT_ROOT'] . '/ucenter/src/JSSDK/JSSDK.php';
}

$appid = "yf12da72d83d5c3378";
$secret = "5592fe299218b27e836c6250bf517782";
//$redirect_url = "123123";

$jssdkClient = JSSDK::getJSSDKClient($appid,$secret,$redirect_url);
if (is_null($jssdkClient)) exit(1);

// 获取用户信息
$userInfo = $jssdkClient->getUserInfo();
var_dump($userInfo);
//JSSDK::println("userInfo: $userInfo");